package com.hwadee.property.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsAutoIncrement;
import com.gitee.sunchenbin.mybatis.actable.annotation.IsKey;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.command.BaseModel;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.LinkedHashMap;

@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Table(name = "parking_use") // 车位使用表
public class ParkingUse extends BaseModel {
    @TableId(type = IdType.AUTO) // mybatis-plus主键注解
    @IsAutoIncrement   // 自增
    @IsKey             // actable主键注解
    @Column(comment = "车位使用ID") // 对应数据库字段，不配置name会直接采用属性名作为字段名comment是注解
    private Long id;

    @TableField(exist = false)
    private LinkedHashMap<String, String> orderBy;

    @TableField(exist = false)
    private int currentPage;

    @TableField(exist = false)
    private int pageSize;

    @TableField(exist = false)
    private int start;

    @Column(comment = "用户ID")
    @TableField("user_id")
    private Long userId;
    @Column(comment = "车辆id")
    @TableField("car_number")
    private String carNumber;
    @Column(comment = "车位id")
    @TableField("parking_id")
    private Long parkingId;
    @Column(comment = "使用性质：购买(默认)，月租，年租，临时")
    @TableField("use_type")
    private String useType;
    @Column(comment = "总费用")
    @TableField("total_fee")
    private Double totalFee;
    @Column(comment = "创建时间")
    @TableField("create_time")
    private String createTime;
    @Column(comment = "更新时间")
    @TableField("update_time")
    private String updateTime;
    @Column(comment = "（使用）开始时间")
    @TableField("start_time")
    private String startTime;
    @Column(comment = "（使用）结束时间")
    @TableField("end_time")
    private String endTime;
}
